﻿using NFine.Code;
using NFine.Data;
using NFine.Domain.Entity.BusinessManage;
using NFine.Domain.Entity.SystemManage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;

namespace NFine.Domain.IRepository.SystemManage
{
    public interface IUserRepository : IRepositoryBase<UserEntity>
    {
        void DeleteForm(string keyValue);
        void SubmitForm(UserEntity userEntity, UserLogOnEntity userLogOnEntity, string keyValue);

        void RegisterNewUserCore(UserEntity registUser, UserLogOnEntity userLogOnEntity, string GoodIds);

        void RegisterFirstUser(UserEntity registUser, UserLogOnEntity userLogOnEntity, string GoodIds);

        void SubmitMemberForm(UserEntity userEntity, UserLogOnEntity userLogOnEntity, string GoodIds, string keyValue);

        void Recharge(UserEntity userEntity);

        void FRecharge(UserEntity userEntity);

        void SubTransfer(UserEntity userEntity);

        List<D_SalaryHistoryEntity> GetUserSalary(string userId);

        List<D_AccountEntity> GetCompanyAccount();

        List<D_AccountEntity> GetCompanyAccount(Expression<Func<D_AccountEntity, bool>> predicate, Expression<Func<UserEntity, bool>> predicate1, Pagination pagination);

        List<D_AccountEntity> GetCompanyAccount(Expression<Func<D_AccountEntity, bool>> predicate, Expression<Func<UserEntity, bool>> predicate1);

        List<D_SalaryHistoryEntity> GetUserSalary(string userId, Expression predicate, Pagination pagination);

        void SubmitMember(UserEntity userEntity, string keyValue);
        void SubmitRePassword(string type, string old, string newpass);

        List<UserEntity> GetMembersList(Expression<Func<UserEntity, bool>> expression, Pagination pagination);

        List<UserEntity> GetMembersList(Expression<Func<UserEntity, bool>> expression);

        UserEntity GetAreas(string userId);

        UserEntity GetForm(string userId);

        UserEntity GetAllMemberFormJson(string keyvalue);

        D_SalaryEntity GetAmcount(string userId);

        UserEntity FindEntityByFunc(Func<UserEntity, bool> predicate);
        UserEntity FindLastUserByCardid(string cardid);
    }
}
